package com.jt.mapper;

import com.jt.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper {

    @Select("select * from user")
    List<User> findAll(User user);

    @Select("select * from user where username = #{username} and password = #{password}")
    User findUserByUP(User user);

    long getTotal(String query);

    List<User> getUserRows(@Param("start") int start,
                           @Param("size") int size,
                           @Param("query") String querys);

    void updateStatus(User user);

    void addUser(User user);

    User findUserById(User user);

    Integer updateUser(User user);

    Integer delectUserById(Integer id);
}
